package User;

import Book.Booklist;
import Operation.*;

import javax.xml.ws.soap.Addressing;
import java.util.Scanner;

public class Administor extends User{
Scanner sc=new Scanner(System.in);
    public Administor(String name){
        super(name);
        this.ioperation=new Ioperation[]{new exitBook(),new selectBook(),new addBook(),new deletBook()
        ,new showBook() };
    }

    public int meau(){
        System.out.println("欢迎"+name+"来到管理员菜单");
        System.out.println("------------------");
        System.out.println("1.查找图书");
        System.out.println("2.新增图书");
        System.out.println("3.删除图书");
        System.out.println("4.显示图书");
        System.out.println("0.退出系统");
        System.out.println("------------------");
        System.out.println("请输入你的操作");
        int num=sc.nextInt();
        return num;
    }
    public void open(int choice,Booklist booklist){
        ioperation[choice].work(booklist);
    }



}
